package com.gln.bloger.service;

import java.util.List;

import com.gln.bloger.exception.BlogerException;
import com.gln.bloger.pojos.Tag;
import com.gln.bloger.pojos.Website;

public interface TagService {
	/**
	 * save or update tag
	 * @param tag
	 */
	public void saveOrUpdateTag(Tag tag)throws BlogerException;

	/**
	 * get hot tags
	 * @param website
	 * @return
	 * @throws BlogerException
	 */
	public List<Tag> getHotTags(Website website) throws BlogerException;
	/**
	 * get all tags
	 * @param website
	 * @return
	 * @throws BlogerException
	 */
	public List<Tag> getTags(Website website) throws BlogerException;
	/**
	 * get tag by id
	 * @param id
	 * @return
	 * @throws BlogerException
	 */
	public Tag getTag(String id) throws BlogerException;
	/**
	 * get tag by name
	 * @param website
	 * @param name
	 * @return
	 * @throws BlogerException
	 */
	public Tag getTagByName(Website website, String name) throws BlogerException;
	/**
	 * clear cached hot tags
	 */
	public void clearCachedHotTags();
	
}
